<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!-- saved from url=(0045)http://web.hand999.com/daili_mobile/login.php -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>商户管理系统登录</title>
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="MobileOptimized" content="240">

<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
  
  <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta content="telephone=no, address=no" name="format-detection">
  <meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="/zy_agent/Public/home/css/public.css" media="all">
    <link rel="stylesheet" type="text/css" href="/zy_agent/Public/home/css/public(1).css" media="all">
    <script src="/zy_agent/Public/home/js/jquery-2.1.0.min.js.下载"></script>
    <!-- <script src="/zy_agent/Public/home/js/jquery-1.6.2.min.js"></script> -->
    <!-- <script src="/zy_agent/Public/home/js/jquery.cookie.js"></script> -->
    <!-- <script src="/zy_agent/Public/home/js/cookie.js"></script> -->
   
    <style type="text/css">
		/*.body{background:url(images/login_bg.jpg) no-repeat center top;}*/
		.login_box{width:80%; height:384px; padding:5%;background-color:#475c82;}
		.pg_title{height:60px; line-height:50px; font-size:1.35em; color:#FFF; border-bottom:solid 1px #f5f5f5;}
		
		.pg_form{padding:15px;}
		.pg_form div.put{height:20px; padding:10px; margin-top:15px; border-radius:5px; border-bottom:solid 1px #d7d7d7; background-color:#FFF;}
		.pg_form div.put1{margin-right:110px; position:relative;}
		.pg_form input.txt{float:left; width:100%; height:20px; line-height:20px; padding:0px; font-size:1.15em; text-align:left; border:none;}
		.pg_form div.put1 img{width:100px; height:34px; border:solid 1px #d7d7d7; position:absolute; right:-110px;top:3px;}
		
		.pg_form div.sel{height:20px; margin-top:20px; text-align:left; font-size:1.25em; color:#FFF;}
		.pg_form div.sel a{color:#FFF;}
		.pg_form div.sel a.reg{float:right; color:#FF0; text-decoration:underline;}
		.pg_form div.sel a.reg:hover{color:#F60;}
		
		.pg_form div.btn{margin-top:25px; margin-bottom:20px;}
		.pg_form div.btn input.btn{width:100%; height:42px; color:#FFF; font-size:1.25em; border:0px; border-radius:8px; background-color:#68c1dc;}
		#an:hover{background:#000}
        #msg{height: 50px;line-height: 50px;color: #fff;font-size: 18px;background: rgba(183,48,48,0.7);text-align: center;display: none;position: relative;top: 35px;}
	</style>
    <script type="text/javascript">

        

    </script>
<body class="body">

<center>
    <div class="login_box">
        <div class="pg_title" onclick="location.reload()">酒都麻将商户管理系统</div>

        <div class="pg_form">
        <form id="myform" name="form1" method="post" action="">
            
            <input type="hidden" name="dosubmit" value="yes">
            <div class="put put_t">
                <input id="accounts" name="accounts" type="text" placeholder="请输入代理ID或手机号" value="<?php echo $_COOKIE['uname']?>" class="txt">
            </div>
            <div class="put">
                <input id="password" name="password" type="password" placeholder="请输入密码" value="<?php echo $_COOKIE['upwd']?>" class="txt">
            </div>
            <div class="put put1">
                <input id="verify" name="verify" autocomplete="off" type="text" class="txt" placeholder="请输入验证码">
                <img id="vertify" src="<?php echo '/zy_agent/Verify' ?>" alt="看不清楚？" onclick="fleshVerify();">
            </div>
            <div class="sel" style="">
                <!--<a href="creatuser.php" class="reg">立即注册</a>-->
                <input id="isagree" name="isagree" type="checkbox" value="2" checked="" class="cb">
                <label for="isagree" class="cb">同意</label><a href="<?php echo '/zy_agent/agreement' ?>">《合作协议》</a>
            </div>
            <div class="sel"  >
                <input type="checkbox" checked="true"  id="rmbUser" value="1">
                <label for="rmbUser">记住密码</label>
            </div>

            <div  class="btn">
                <input id="an" type="button" value="登 录" class="btn" >
                <!-- <button id="" type="submit" class="" onclick="checkLogin()">登陆</button>  -->
            </div>
        </form>
        </div>
     <p id="msg"></p>
    </div>
    
</center>
<div id="hintbox" class="hint_box">
 <span id="hintmsg"></span>
</div>

  
<script type="text/javascript">


function fleshVerify(){
//重载验证码
document.getElementById("vertify").src = "<?php echo '/zy_agent/Verify' ?> ?"+Math.random();

}


$(function(){  
    $('#an').click(function(){  
        // console.log("click===>");
        var $unameVal = $.trim($('#accounts').val());  
        var $upwdVal = $.trim($('#password').val());  
        var $verify = $.trim($('#verify').val());  
        
        // var $isagree = $.trim($('#isagree').val()); 
        // alert($isagree);return false;  
        //如果没有填写数据,则直接返回false.不执行ajax提交操作  
        if($unameVal == ''){  
             
             $('#msg').html('用户名不能为空').show ().delay (2000).fadeOut(); 
            return false;  
        }
        if($upwdVal == ''){  
             $('#msg').html('密码不能为空').show ().delay (2000).fadeOut(); 
            return false;  
        }
        if($verify == ''){  
             $('#msg').html('验证码不能为空').show ().delay (2000).fadeOut(); 
            return false;  
        }
        if ($('#isagree').prop('checked') == false) {
            $('#msg').html('请在阅读《合作协议》后在同意前打钩，点击登陆').show ().delay (2000).fadeOut(); 
             return false; 
        }
        if ($('#rmbUser').prop('checked') == true) {
            var $rmbUser = $.trim($('#rmbUser').val());  
        }else{
            var $rmbUser =2;
        }       
        
        $.post('/zy_agent/checkLogin', {uname : $unameVal,upwd : $upwdVal,verify : $verify,rmbUser : $rmbUser},
            function($data){  
            if($data['state'] == 1){  
                $('#msg').css('background','#20A74E').html('登陆成功').show ().delay (500);
                setTimeout(function(){location.href='http://<?php echo $_SERVER['SERVER_NAME']; ?>/zy_agent/index.html';},500);
            }
            else if($data['state'] == 0){  
                
                $('#msg').html('用户名或密码错误').show ().delay (3000).fadeOut();
                return false;  
            }
            else if($data['state'] == 2){ 
                
                $('#msg').html('验证码错误').show ().delay (3000).fadeOut();
                return false;  
            }      
        },"json");  
        
    });  
});  

document.onkeydown = function (e) {
            var theEvent = window.event || e;
            var code = theEvent.keyCode || theEvent.which;
            if (code == 13) {
                $("#an").click();
            }
        }


</script>

</body></html>